<layout name="layout" />
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			$(function(){
				$('#ups').change(function(){
					var form = $('#lunbo_form')[0];
					var formdata1 = new FormData(form);
					
					$.ajax({  
				        type : "post",  
				        url : "{:U('ajax_up')}",  
				        data : formdata1,
				        async: false,  
				        cache: false,  
				        contentType: false,  
				        processData: false,
				        success : function(data) {  
				            if(data){
				            	//alert('提交成功！');
				            	$('#img_post').val(data);
				            	var img = "<img width='200' height='200' src='__UPLOADS__/" + data + "' />";
				            	$('.img').html(img);
				            } 
				        }  
					}); 
				});
				
					
			});
		</script>
	</head>
	<body>
		<form id="lunbo_form" action="" method="post">
			TITLE:<input type="text" name="" value="{:C('TITLE')}" />
			KEYWORDS:<input type="text" name="" value="{:C('KEYWORDS')}" />
			DESCRIPT:<input type="text" name="" value="{:C('DESCRIPT')}" />
			LOGO:
			
			<input type="hidden" name="LOGO" id="img_post" value="{:C('LOGO')}" />
			<input type="hidden" name="old_logo" value="{:C('LOGO')}" />
			<div class="img">
				<img width='200' height='200' src="__UPLOADS__/{:C('LOGO')}"/>
			</div>
			
			<input type="file" value="" id="ups" />
			
			BANQUAN:<input type="text" name="" value="{:C('BANQUAN')}" />
			<input type="submit" value="提交"/>
			<input type="reset" value="重置" />
		</form>
	</body>
</html>
